export namespace="monitor-system"
export app_name="deepflow"
export repo="deepflow"
export helm="$repo/$app_name"
# export url="https://deepflowio.github.io/deepflow"
export url="https://deepflow-ce.oss-cn-beijing.aliyuncs.com/chart/stable"
# helm search repo deepflow/deepflow --devel -l
export tag=$(curl -sL https://api.github.com/repos/deepflowio/deepflow/releases | jq -r ".[0].name")
echo "DeepFlow tag: $tag"

# helm repo remove $repo
helm repo add $repo $url
helm repo update $repo

helm upgrade --install -n $namespace \
	--create-namespace $app_name $helm \
	--set image.server.tag="$tag" \
	--set image.app.tag="$tag" \
	--set deepflow-agent.image.tag="$tag" \
	-f values-custom.yaml

# admin:deepflow
